using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#if SILVERLIGHT
using AbstraX.ClientInterfaces;
using AbstraX.Bindings;
#else
using AbstraX.ServerInterfaces;
using AbstraX.Bindings;
#endif

namespace AbstraX.Contracts.ComponentModel
{
    public enum PropertyValueType
    {
        Simple,
        Complex,
        Instance,
        Query
    }

    public interface IComponentType
    {
        string ComponentTypeID { get; }
        string Name { get; }
        IComponentType BaseComponent { get; }
        IComponentPropertyTree ComponentPropertyTree { get; }
    }

    public interface IPropertyValue
    {
        PropertyValueType PropertyValueType { get; }
        string SimpleValue { get; }
        byte[] ComplexValue { get; }
        IQuery QueryResult { get; }
        string ObjectInstanceID { get; }
    }

    public interface IComponentPropertyNode
    {
        string Name { get; }
        string PropertyObjectID { get; }
        IBase PropertyObject { get; }
        List<IComponentPropertyNode> ChildNodes { get; }
    }

    public interface IComponentPropertyNodeInstance
    {
        IComponentPropertyNode ComponentPropertyNode { get; set; }
        string Name { get; }
        string PropertyObjectID { get; }
        IBase PropertyObject { get; }
        List<IComponentPropertyNodeInstance> ChildNodes { get; }
        IPropertyValue PropertyValue { get; set; }
    }

    public interface IComponentPropertyTree
    {
        List<IComponentPropertyNode> RootNodes { get; }
    }

    public interface IComponentPropertyTreeInstance
    {
        IComponentPropertyTree ComponentPropertyTree { get; set; }
        List<IComponentPropertyNodeInstance> RootNodes { get; }
    }

    public interface IComponentInstance
    {
        string ID { get; }
        string ComponentTypeID { get; }
        IComponentPropertyTreeInstance ComponentPropertyTree { get; }
    }
}
